<?php
require_once 'renderer_relation.php';

class renderer_relation_has_and_belongs_to_many extends renderer_relation
{
    
    
    public function viewRender($fObj)
    {
        $collection = $fObj->getValue();
        
        if(sizeof($collection) > 0)
        {
            $vArr = array();
            
            foreach($collection as $item)
            {
                $vArr[] = $this->_resolveDisplay($fObj, $item);
            }
            
            return implode(', ', $vArr);
        }
               
        
        
        
        
    }
    
    
    public function editRender($fObj)
    {
        return "<select></select>";
    }
    
    
}